package com.tyk.bookstore.back.product.model.vo;

import com.tyk.bookstore.back.common.core.model.page.PageVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author tyk
 * @description 分类
 */
@Data
@Schema(name = "ClazzPageVo", description = "分类")
public class ClazzPageVo extends PageVo<ClazzPageVo.Classification> {

    @Data
    @Schema(name = "Classification", description = "分类")
    public static class Classification implements Serializable {

        @Serial
        private static final long serialVersionUID = 1L;

        @Schema(description = "ID")
        private Long id;

        @Schema(description = "级别[1一级，2二级，3三级]")
        private Byte level;

        @Schema(description = "父级ID")
        private Long parentId;

        @Schema(description = "名称")
        private String name;

        @Schema(description = "创建时间")
        private LocalDateTime createTime;

        @Schema(description = "更新时间")
        private LocalDateTime updateTime;

        @Schema(description = "是否拥有子结点")
        private Boolean hasChildren = true;

        @Schema(description = "子项")
        private List<ClazzListVo> children;
    }
}
